<?php
/**
 * @author 595949289@qq.com
 * @date 2025/4/10 17:20
 */

namespace CuiFox\yii\helpers;

/**
 * Gets the value of an environment variable.
 * @param $key
 * @param $default
 * @return array|false|mixed|string|null
 */
function env($key, $default = null)
{
    return getenv($key) ?: $default;
}